﻿using InfoJetSoft.Service.Util;
using System.IO;

namespace ServBus.ListForm2010.Extension
{
    public class ExportFileStorage : IExportFileStorage
    {
        public static bool Enabled = false;

        public string GetExportFilePath(string fileId, string fileName)
        {
            return "/InfoJetServiceWork/ExportFile.aspx?fileId=" + fileId + "&fileName=" + fileName;
        }

        public void ExportFileContent(string fileId, string fileName, byte[] content)
        {
            FileStream stream = new FileStream(@"c:\log\" + fileId + "." + fileName, FileMode.Create);
            stream.Write(content, 0, content.Length);
            stream.Close();
        }
    }

}
